﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DAL.Migrations
{
    public partial class InitDB : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Admin_Model",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Pwd = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Admin_Model", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "FangHao_Model",
                columns: table => new
                {
                    FHId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FXId = table.Column<int>(type: "int", nullable: false),
                    MDId = table.Column<int>(type: "int", nullable: false),
                    FXName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MDName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FH = table.Column<int>(type: "int", nullable: false),
                    FHMS = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FHZT = table.Column<int>(type: "int", nullable: false),
                    FHDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_FangHao_Model", x => x.FHId);
                });

            migrationBuilder.CreateTable(
                name: "FangJia_Model",
                columns: table => new
                {
                    FJId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FXId = table.Column<int>(type: "int", nullable: false),
                    FJName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FJprice = table.Column<int>(type: "int", nullable: false),
                    FJNum = table.Column<int>(type: "int", nullable: false),
                    FJZC = table.Column<int>(type: "int", nullable: false),
                    FJZT = table.Column<int>(type: "int", nullable: false),
                    FJDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_FangJia_Model", x => x.FJId);
                });

            migrationBuilder.CreateTable(
                name: "MenDian_Model",
                columns: table => new
                {
                    MDId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MDName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MDPhoto = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MDAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MDPhone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MDMS = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MDZT = table.Column<int>(type: "int", nullable: false),
                    MDDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MenDian_Model", x => x.MDId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Admin_Model");

            migrationBuilder.DropTable(
                name: "FangHao_Model");

            migrationBuilder.DropTable(
                name: "FangJia_Model");

            migrationBuilder.DropTable(
                name: "MenDian_Model");
        }
    }
}
